package view;

import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JTextField;

/**
 * 监听输入光标.
 * @author Rex
 *
 */
public class InputAction implements MouseListener{
	
	private JTextField jtf;
	
	public InputAction(JTextField jtf) {
		this.jtf = jtf;
	}
	
	/**
	 * 监听光标插入.
	 */
	@Override
	public void mouseClicked(MouseEvent e) {
		jtf.setText("");
		jtf.setForeground(Color.black);
	}
	
	@Override
	public void mousePressed(MouseEvent e) {}
	@Override
	public void mouseReleased(MouseEvent e) {}
	@Override
	public void mouseEntered(MouseEvent e) {}
	@Override
	public void mouseExited(MouseEvent e) {}
	
}